﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" UICulture="auto" Theme="SkinFile"
    CodeFile="TaskListV2.aspx.cs" Inherits="TaskListV2" Title="检验任务列表" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <h1 id="pagetitle" class="pagetitle">
        检验任务列表
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div class="anistyle" id="ani">
                    正在加载数据，请耐心等待...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    </h1>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div class="condition">
                <div class="conditioninput">
                    合同编号：<asp:TextBox ID="txtReportID" runat="server" Width="150px"></asp:TextBox>
                    类型：<asp:DropDownList ID="ddlType" runat="server">
                        <asp:ListItem Value="" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="1" Text="大电流"></asp:ListItem>
                        <asp:ListItem Value="2" Text="大容量"></asp:ListItem>
                    </asp:DropDownList>
                    状态：<asp:DropDownList ID="ddlStatus" runat="server" Width="120">
                        <asp:ListItem Value="" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="0" Text="已创建"></asp:ListItem>
                        <asp:ListItem Value="16" Text="已下发"></asp:ListItem>
                        <asp:ListItem Value="17" Text="执行中"></asp:ListItem>
                        <asp:ListItem Value="18" Text="已完成"></asp:ListItem>
                        <asp:ListItem Value="34" Text="组长已确认"></asp:ListItem>
                        <asp:ListItem Value="160" Text="已退回"></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="conditionbutton">
                    <asp:Button ID="BtnQuery" runat="server" Text="查询任务" Width="80px" OnClick="BtnQuery_Click" />&nbsp;
                </div>
            </div>
            <div runat="server" id="divResult" class="divResult">
                <asp:Label ID="OperationResult" CssClass="result" runat="server" Text=""></asp:Label>
            </div>
            <div class="InfoArea">
                <asp:Panel ID="SummaryPanel" runat="server" Width="100%">
                    <asp:GridView ID="TaskGridView" runat="server" AutoGenerateColumns="False" Width="100%"
                        DataKeyNames="CT_ID" SkinID="gridviewSkin">
                        <Columns>
                            <asp:BoundField DataField="CT_ID" HeaderText="任务序号">
                                <HeaderStyle Width="60px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Report_ID" HeaderText="合同编号">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CT_TypeName" HeaderText="任务类型">
                                <HeaderStyle Width="60px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="LeaderName" HeaderText="负责人" />
                            <asp:BoundField DataField="TesterName" HeaderText="测试员">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CT_StatusName" HeaderText="状态">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CT_Assign_Date" DataFormatString="{0:yyyy-MM-dd }" HtmlEncode="False"
                                HeaderText="下发日期">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CT_Begin_Date" DataFormatString="{0:yyyy-MM-dd }" HtmlEncode="False"
                                HeaderText="开始日期">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CT_End_Date" DataFormatString="{0:yyyy-MM-dd }" HtmlEncode="False"
                                HeaderText="结束日期">
                                <HeaderStyle Width="120px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <a href='TaskDetailV2.aspx?CTID=<%# DataBinder.Eval(Container.DataItem, "CT_ID")%>'>详细</a>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" Width="100px" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <webdiyer:AspNetPager ID="AspNetPager" runat="server" ShowCustomInfoSection="Left"
                        CustomInfoHTML="总记录数：%RecordCount%，总页数：%PageCount%，当前为第%CurrentPageIndex%页" CustomInfoTextAlign="left"
                        CustomInfoStyle="padding-top:8px;font-weight:bold;" HorizontalAlign="right" FirstPageText="首页"
                        LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" ShowPageIndexBox="Always"
                        SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" CssClass="anpager"
                        CurrentPageButtonClass="cpb" OnPageChanged="AspNetPager_PageChanged">
                    </webdiyer:AspNetPager>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
